import axios from 'axios'
import { commonParams, ismock } from 'src/api/config'

export function getBanners () {
  const url = ismock ? './static/mock/banner.json' : ''
  const data = Object.assign({}, commonParams, {

  })
  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}
export function getPoint () {
  const url = ismock ? './static/mock/homepoint.json' : ''
  const data = Object.assign({}, commonParams, {

  })
  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}
export function getHomehotels () {
  const url = ismock ? './static/mock/homehotels.json' : ''
  const data = Object.assign({}, commonParams, {

  })
  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}
